package com.surveypark.dao;

import java.util.List;

/**
 * dao�ӿ�
 */
public interface BaseDao<T> {
	// д����
	public void saveEntity(T t);

	public void updateEntity(T t);

	public void saveOrUpdateEntity(T t);

	public void deleteEntity(T t);

	// ����hql����ʵ��
	public void batchEntityByHQL(String hql, Object... objects);
	
	public void executeSQL(String sql, Object...objects);

	public T getEntity(Integer id);

	public T loadEntity(Integer id);

	public List<T> findEntityByHQL(String hql, Object... objects);
	
	/**
	 * ִ�в�������HQL��ѯ���
	 * @param hql ��ѯ���
	 * @return ʵ�弯��
	 */
	public List<T> findEntityByHQL(String hql);
	
	public Object uniqueResult(String hql, Object... objects);
	
	//按照sql查询
	public List<T> findObjectBySQL(String sql, Object...objects);
}
